/**
 * A very simplistic 'accordion'.
 */
var Accordion = new Class(
{
	initialize: function(togglers, contents, display)
	{
		this.togglers = togglers;
		this.contents = contents;
		this.display  = display || '';
		
		this.hideAll();
		for (var i = 0; i < this.togglers.length; i++)
			this.togglers[i].addEvent('click', this.toggle.pass(i, this));
	},
	
	hideAll: function()
	{
		for (var i = 0; i < this.contents.length; i++)
			this.contents[i].setStyle('display', 'none');
	},
	
	toggle: function(i)
	{
		this.hideAll();
		this.contents[i].setStyle('display', this.display);
	}
});